package com.lvyq.qrobot;

import cn.hutool.json.JSONUtil;
import com.lvyq.qrobot.common.UrlConstant;
import com.lvyq.qrobot.model.send.*;
import com.lvyq.qrobot.util.CommonUtil;
import com.lvyq.qrobot.util.HttpClientUtil;
import org.apache.ibatis.annotations.Param;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;

import java.util.ArrayList;
import java.util.List;

/**
 * @author lvyq
 * @version 1.0
 * Create by 2024-07-09 17:26
 */
public class Demo4 {
    public static void main(String[] args) {
        SendParam param = new SendParam();
       List<Object> ms = new ArrayList<>();
        param.setGroup_id(495673338);
       /*  MsgAT msgAT = new MsgAT();
        DataAT dataAT = new DataAT();
        dataAT.setQq("1540194374");
        msgAT.setData(dataAT);
        ms.add(msgAT);
        Msg msg = new Msg();
        msg.setType("text");
        Data data = new Data();
        data.setText("你好sdasdasd啊");
        msg.setData(data);
        ms.add(msg);*/

        String s = JSONUtil.toJsonStr(ms);
        s="[CQ:reply,id=851118598][CQ:at,qq=1482996173] 东方闪电";
        System.out.println("s = " + s);
        param.setMessage(s);
        HttpClientUtil.doPostJson(UrlConstant.send_group_msg,param);
      //  HttpClientUtil.doPostJson2(UrlConstant.send_group_msg,param);

    }
}
